import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
import { resolve } from 'path'
export default () => {
    const root = process.cwd();
    function pathResolve(dir: string) {
        return resolve(root, './', dir);
    }
    
    return createSvgIconsPlugin({
      iconDirs: [pathResolve('src/assets/svgs')],
      symbolId: 'icon-[dir]-[name]',
      svgoOptions: true
    });
};